package org.ash.user.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

import static org.ash.base.constant.MessageConstant.PHONE_FORMAT_INCORRECT;

/**
 * @author zhang
 * @date 2024/12/23
 * @description
 */
@Data
public class LoginPhoneFormDTO {
    @ApiModelProperty(value = "手机号")
    @Pattern(regexp = "^[1][3-9][0-9]{9}$", message = PHONE_FORMAT_INCORRECT)
    @NotBlank(message = "手机号不能为空")
    private String phone;

    @ApiModelProperty(value = "验证码")
    @NotBlank(message = "验证码不能为空")
    private String code;
}
